package com.company.cloud.page.modules.api.fallback;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.page.modules.api.models.PageComponentModel;
import com.company.cloud.page.modules.api.request.*;
import com.company.cloud.page.modules.api.response.PageComponentPageResponse;
import com.company.cloud.page.modules.api.service.PageComponentClientService;
import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

@Deprecated
@Log4j2
@Component
public class PageComponentClientServiceFallbackFactory implements FallbackFactory<PageComponentClientService>{

	@Override
	public PageComponentClientService create(Throwable cause) {
		return new PageComponentClientService() {

			@Override
			public BaseClientResult<String> save(PageComponentSave2UpdateRequest params) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<String> update(PageComponentSave2UpdateRequest params) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<String> updateState(PageComponentUpdateStateParam params) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<String> delete(PageComponentDeleteRequest params) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<PageComponentPageResponse> query(PageComponentQueryParam params) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<PageComponentModel> getById(String code) {
				return BaseClientResult.callbackError();
			}
		};
	}


}
